package br.gov.cemaden.sendmail;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.Set;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {                              
        
        Path input = Paths.get("mail.properties");
        if(!Files.exists(input)){
            System.err.println("The file " + input.toString());
            System.exit(0);
        }
                
        Set<String> emails = new HashSet<String>();
        emails.add("alan.ado1@gmail.com");        
        emails.add("aln@.com");
        emails.add("alan.oliveira@cptec.inpe.br");
        
        new Sendmail("Sendmail test", "Sendmail test", input)                
                .setRecipients(emails)
                .send();
        
    }
}
